<#import "/admin/_layout.html" as layout>
<@layout.header "用户标签"></@layout.header>
<@layout.body>
    <div class="content-header">
        <div class="container-fluid">
            <div class="row mb-2">
                <div class="col-sm-6">
                    <ol class="breadcrumb float-sm-left">
                        <li class="breadcrumb-item"><a href="#">标签</a></li>
                        <li class="breadcrumb-item active">新增</li>
                    </ol>
                </div>
            </div>
        </div>
    </div>
    <section class="content">
        <div class="container-fluid">
            <div class="card card-default">
                <form id="myForm" method="POST" action="/admin/user/tag/doSave" ok="/admin/user/tag/list">
                    <input type="hidden" name="id" value="${(userTag.id)!}">
                    <div class="card-body">
                        <div class="form-group">
                            <label for="roleName">标签名称</label>
                            <input type="text" name="title" class="form-control" id="title" placeholder="请输入标签名称" value="${(userTag.title)!}">
                        </div>
                        <div class="form-group">
                            <label for="roleName">标签描述</label>
                            <input type="text" name="desc" class="form-control" id="desc" placeholder="请输入标签描述" value="${(userTag.desc)!}">
                        </div>
                        <div class="form-group">
                            <label for="roleName">排序</label>
                            <input type="number" name="sortNum" class="form-control" id="sortNum" placeholder="请输入标签排序" value="${(userTag.sortNum)!}">
                        </div>
                    </div>
                    <div class="card-footer">
                        <button type="submit" class="btn btn-primary">提交</button>
                    </div>
                </form>
            </div>
        </div>
    </section>
</@layout.body>
<@layout.script>
    <script>
        $(function () {
            submitForm({
                title: { required: true}
            },{
                title: {required: "请输入标签名称"}
            })
        });
    </script>
</@layout.script>